package day240420;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class JsoupDemo2 {
    public static void main(String[] args) throws IOException {
        Document doc = Jsoup.connect("https://so.gushiwen.org/gushi/shijing.aspx").get();

        System.out.println("当前网页列出的诗经一共有："+doc.getElementsByClass("typecont").select("span").size());
        System.out.println(doc.getElementsByClass("typecont").select("span").text());
    }
}
